﻿<!-- INCLUDE page_header.html -->

<script type="text/javascript">
    $(function () {
        $("#post").sceditor({
            plugins: "bbcode",
            style: "/styles/bbcode.min.css",
            toolbar: "bold,italic,underline|size,color|bulletlist,orderedlist|quote,code|link,unlink,image,emoticon,youtube|source",
<!-- IF $_IS_DESKTOP -->
            emoticons: {
                dropdown: {
                    <!-- BEGIN emoticon_list -->
                    "{emoticon_list.CODE}": "{emoticon_list.URI}",
                    <!-- END emoticon_list -->
                },
                hidden: {
                <!-- BEGIN emoticon_hidden_list -->
                "{emoticon_hidden_list.CODE}": "{emoticon_hidden_list.URI}",
                <!-- END emoticon_hidden_list -->
<!-- ENDIF -->
                }
            }
        });
    });
</script>

<!-- IF $_IS_DESKTOP -->
<div class="breadcrumbs"><p>{BREADCRUMBS}</p></div>
<!-- ENDIF -->

<!-- INCLUDE primitive_header.html -->

<div id="page-body">
<!-- INCLUDE forum_header -->

<!-- IF ERROR -->
<p class="error">{ERROR}</p>
<!-- ENDIF -->

<!-- IF PREVIEW -->
<ul id="posts">
  <li>
  	<div class="post">
      <div class="postbody">
        <h3 id="p-preview">Preview: {SUBJECT}</h3>
          <div class="inner">
      	    <p>{PREVIEW}</p>
      	    <!-- IF SIGNATURE -->
      	    <p>____________________<br/>{SIGNATURE}</p>
      	    <!-- ENDIF -->
          </div>
        </div>
        <div class="top"></div>
      </div>
  </li>
</ul>
<!-- ENDIF -->

<form id="forum-post-form" class="account-pane" action="{S_POST}" method="post">
  <fieldset>
    <legend>{L_POST}</legend>
    <dl>
      <dt>
        <label for="subject">{L_POST_SUBJECT}</label>
      </dt>
      <dd>
        <input type="text" id="subject" name="subject" value="{S_SUBJECT}" style="width: 100%;" />
      </dd>
      <dt>
        <label for="post">{L_POST_TEXT}</label>
      </dt>
      <dd>
        <textarea id="post" name="post" style="margin: 0px; width: 100%; height: 250px;" cols="70" rows="15">{S_POST_TEXT}</textarea>
      </dd>
      <!-- TODO: enable smilies -->
      <!-- TODO: enable bbcode -->
      <!-- TODO: moderation stuffs -->
      <!-- IF S_TOPIC_STATE -->
      <dt>
        <label for="topic-state">{L_TOPIC_STATE}</label>
      </dt>
      <dd>
        {S_TOPIC_STATE}
      </dd>
      <!-- ENDIF -->
      <dt></dt>
      <dd>
        <!--input type="submit" name="save" value="Save (draft)" /-->
        <input type="submit" name="preview" value="Preview" />
        <input type="submit" name="submit" value="Submit" />
      </dd>
    </dl>
    <input type="hidden" name="mode" value="{S_MODE}" />
    <!-- IF S_FORUM -->
    <input type="hidden" name="f" value="{S_FORUM}" />
    <!-- ENDIF -->
    <!-- IF S_TOPIC -->
    <input type="hidden" name="t" value="{S_TOPIC}" />
    <!-- ENDIF -->
    <!-- IF S_ID -->
    <input type="hidden" name="id" value="{S_ID}" />
    <!-- ENDIF -->
  </fieldset>
</form>

<!-- IF PREVIEW_TOPIC -->
<ul id="posts">
  <!-- BEGIN post_list -->
  <li>
    <div class="post">
      <div class="postbody">
    <h3 id="p{post_list.ID}">
      <a href="{post_list.URI}">{post_list.SUBJECT}</a>
    </h3>
    <p>
      <!-- IF post_list.IS_READ -->
      <img src="/images/posticon_read_sml.png" alt="Read" />
      <!-- ELSE -->
      <img src="/images/posticon_unread_sml.png" alt="New" />
      <!-- ENDIF -->
      by <strong>
        <a href="{post_list.U_USER}">{post_list.USER_DISPLAY_NAME}</a>
      </strong> on {post_list.POST_TIME}
    </p>
    <div class="inner">
      <p>{post_list.TEXT}</p>
    </div>
    </div>
    <div class="top"><a href="#posts">{L_TOP}</a></div>
    </div>
  </li>
  <!-- END post_list -->
</ul>
<!-- ENDIF -->
</div>
<!-- INCLUDE primitive_footer.html -->
<!-- INCLUDE page_footer.html -->